<!-- 子组件 -->
<template>
    <div>
        <h3>Child</h3>
        <p>Child中的num：{{ num }}</p>
        <hr>
        <Son></Son>
    </div>
</template>

<script>
import Son from "@/components/Son.vue";

export default {
    name: "Child",
    components: {
        Son
    },
    data() {
        return {
            num: 0
        }
    },
    methods: {
        addNum() {
            this.num++
        }
    },
}
</script>